package cn.iocoder.yudao.module.wms.enums;

import lombok.Getter;

/**
 * 配送状态 枚举
 */
@Getter
public enum DistributionStatusEnum {

    WAIT_AUDIT(0, "等待审核"),
    TRANSIT(1, "正在运输"),
    DISTRIBUTION_OK(2, "配送完成"),
    ;

    private Integer code;
    private String desc;

    DistributionStatusEnum(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static String getDescByCode(Integer code) {
        for (DistributionStatusEnum item : DistributionStatusEnum.values()) {
            if (item.code.equals(code)) {
                return item.desc;
            }
        }
        return null;
    }

}
